package com.mj.mapper;

import com.mj.entity.Book;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface BookMapper {
    @Select("select * from book where id = #{id}")
    public Book queryById(int id);
    @Insert("insert into book values(null,#{name},#{price},#{date})")
    public int insert(Book book);
    public List<Map<String,Object>> queryAll();
}
